# This is a config file for BeeGFS clients.
# http://www.beegfs.com


# --- [Table of Contents] ---
#
# 1) Settings
# 2) Mount Options
# 3) Basic Settings Documentation
# 4) Advanced Settings Documentation


#
# --- Section 1.1: [Basic Settings] ---
#

sysMgmtdHost                  = {{ beegfs_mgmtd_host }}


#
# --- Section 1.2: [Advanced Settings] ---
#

connAuthFile                  =
connClientPortUDP             = 8004
connHelperdPortTCP            = 8006
connMgmtdPortTCP              = 8008
connMgmtdPortUDP              = 8008
connPortShift                 = 0

connCommRetrySecs             = 600
connFallbackExpirationSecs    = 900
connInterfacesFile            =
connMaxInternodeNum           = 32
connNetFilterFile             =

connUseRDMA                   = true
connRDMABufNum                = 70
connRDMABufSize               = 32768
connRDMATypeOfService         = 0
connTcpOnlyFilterFile         =

logClientID                   = false
logHelperdIP                  =
logLevel                      = 3
logType                       = helperd

quotaEnabled                  = false

sysCreateHardlinksAsSymlinks  = false
sysMountSanityCheckMS         = 11000
sysSessionCheckOnClose        = false
sysSyncOnClose                = false
sysTargetOfflineTimeoutSecs   = 900
sysUpdateTargetStatesSecs     = 30
sysXAttrsEnabled              = false

tuneFileCacheType             = native
tuneFileCacheBufSize          = 33554432
tunePreferredMetaFile         =
tunePreferredStorageFile      =
tuneRemoteFSync               = false
tuneUseGlobalAppendLocks      = false
tuneUseGlobalFileLocks        = false


#
# --- Section 1.3: [Enterprise Features] ---
#
# See end-user license agreement for definition and usage limitations of
# enterprise features.
#

sysACLsEnabled                = false


#
# --- Section 2: [Mount Options] ---
#

# Valid mount options are:
# cfgFile, logLevel, connPortShift, connMgmtdPortUDP, connMgmtdPortTCP,
# sysMgmtdHost, sysMountSanityCheckMS.
#
# Use the mount option "cfgFile" to specify a different config file
# for the beegfs client.
# Example:
# $ /bin/mount -t beegfs beegfs_nodev /beegfs -ocfgFile=/etc/anotherconfig.conf
#
# Mount options override the corresponding config file values.
# Example:
# $ /bin/mount -ocfgFile=/etc/anotherconfig.conf,logLevel=3 ...


#
# --- Section 3: [Basic Settings Documentation] ---
#

# [sysMgmtdHost]
# Hostname (or IP) of the host running the management service.
# (See also "connMgmtdPortUDP" and "connMgmtdPortTCP".)
# Default: <none>


#
# --- Section 4: [Advanced Settings Documentation] ---
#

#
# --- Section 4.1: [Connections & Communication] ---
#

# [connAuthFile]
# The path to a file that contains a shared secret for connection based
# authentication. Only peers that use the same shared secret will be able to
# connect.
# Default: <none>

# [connClientPortUDP]
# The UDP port of the client.
# Default: 8004

# [connHelperdPortTCP]
# The TCP port of the client helper daemon.
# Default: 8006

# [connMgmtdPortUDP], [connMgmtdPortTCP]
# The UDP and TCP ports of the management node.
# Default: 8008

# [connPortShift]
# Shifts all following UDP and TCP ports according to the specified value.
# Intended to make port configuration easier in case you do not want to
# configure each port individually.
# Default: 0

# [connCommRetrySecs]
# The time (in seconds) for retries in case a network communication fails
# (e.g. if a server is down). After this time, the I/O operation will fail
# and the calling process will receive an error.
# Note: Set this value to 0 for infinite retries. In this case, a process
#    accessing the file system will block until the corresponding server
#    becomes available (or until it is interrupted by a signal).
# Default: 600

# [connFallbackExpirationSecs]
# The time in seconds after which a connection to a fallback interface expires.
# When a fallback connection expires, the system will try to establish a new
# connection to the other hosts  primary interface (falling back to another
# interface again if necessary).
# Note: The priority of node interfaces can be configured using the
#    "connInterfacesFile" parameter.
# Default: 900

# [connInterfacesFile]
# The path to a text file that specifies the names of the interfaces, which
# may be used for communication by other nodes. One interface per line. The
# line number also defines the priority of an interface.
# Example: "ib0" in the first line, "eth0" in the second line.
# Values: This setting is optional. If unspecified, all available interfaces
#    will be published and priorities will be assigned automatically.
# Note: This has no influence on outgoing connections. The information is sent
#    to other hosts to inform them about possible communication paths.
# Default: <none>

# [connMaxInternodeNum]
# The maximum number of simultaneous connections to the same node.
# Default: 12

# [connNetFilterFile]
# The path to a text file that specifies allowed IP subnets, which may be used
# for outgoing communication. One subnet per line in classless notation (IP
# address and number of significant bits).
# Example: "192.168.10.0/24" in the first line, "192.168.20.0/24" in the second
# line.
# This value is optional. If unspecified, all addresses are allowed for
# outgoing communication.
# Default: <none>

# [connUseRDMA]
# Enables the use of Remote Direct Memory Access (RDMA) for Infiniband or RoCE.
# For this setting to be effective, OFED ibverbs support also has to be enabled
# at compile time of the beegfs client modules (typically via
# beegfs-client-autobuild.conf).
# Default: true

# [connRDMABufNum], [connRDMABufSize]
# Infiniband RDMA buffer settings.
# connRDMABufSize is the maximum size of a buffer (in bytes) that will be sent
# over the network; connRDMABufNum is the number of available buffers that can
# be in flight for a single connection. These client settings are also applied
# on the server side for each connection.
# Note: RAM usage per connection is connRDMABufSize x connRDMABufNum x 2. Keep
#    resulting RAM usage (x connMaxInternodeNum x number_of_clients) on the
#    server in mind when increasing these values.
# Note: The client needs to allocate physically contiguous pages for
# connRDMABufSize, so this setting shouldn't be higher than a few kbytes.
# Default: 8192, 70

# [connRDMATypeOfService]
# Infiniband provides the option to set a type of service for an application.
# This type of service can be used by your subnet manager to provide Quality of
# Service functionality (e.g. setting different service levels).
# In openSM the service type will be mapped to the parameter qos-class, which
# can be handled in your QoS configuration.
# See
# www.openfabrics.org/downloads/OFED/ofed-1.4/OFED-1.4-docs/QoS_management_in_OpenSM.txt
# for more information on how to configure openSM for QoS.
# This parameter sets the type of service for all outgoing connections of this
# client.
# Note: If you use the RDMA modules from the Linux kernel, this does not work
#    with kernels prior to 2.6.24.
# Default: 0 (Max: 255)

# [connTcpOnlyFilterFile]
# The path to a text file that specifies IP address ranges to which no RDMA connection should be
# established. This is useful e.g. for environments where all hosts support RDMA, but some hosts
# cannot connect via RDMA to some other hosts.
# Example: "192.168.10.0/24" in the first line, "192.168.20.0/24" in the second
#    line.
# Values: This setting is optional.
# Default: <none>

#
# --- Section 4.2: [Logging] ---
#

# [logClientID]
# Defines whether the ClientID should appear in each log line. This usually
# makes sense only if you use remote logging and want to use the same
# beegfs-helperd instance for multiple clients.
# Note: Use "logHelperdIP" to enable remote logging.
# Default: false

# [logHelperdIP]
# Defines the IP address of the node on which the beegfs-helperd runs for
# remote logging. This is typically useful only if you want to combine the
# log messages of several clients on a single machine.
# If this value is undefined, the beegfs-helperd is assumed to be running on
# the local machine.
# Default: <none>

# [logLevel]
# Defines the amount of log messages. The higher this level, the more detailed
# the log messages will be.
# Level 3 will print connection messages, level 4 will print syscall messages,
# level 5 will print debug messages.
# Note: Levels above 3 might decrease performance.
# Default: 3 (Max: 5)

# [logType]
# Defines the logger type. This can either be "helperd" to send log messages to
# the helper daemon (which will append them to the specified log file) or
# "syslog" to send log messages to the general system logger.
# Default: helperd


#
# --- Section 4.3: [Quota Settings] ---
#

# [quotaEnabled]
# Enables user and group quota support by transferring extra user data to the
# servers. This uses quota information of the underlying file systems on the
# storage servers, which needs to be enabled by the server administrator.
# Note: In the first implementation, only quota monitoring is available.
# Note: Get quota information with "beegfs-ctl --getquota".
# Note: If this option is true, performance might be slightly decreased due to
#    extra information tracking.
# Default: false


#
# --- Section 4.4: [System Settings] ---
#

# [sysCreateHardlinksAsSymlinks]
# Create a symlink when an application tries to create a hardlink for files in
# different directories.
# Default: false

# [sysMountSanityCheckMS]
# Perform some basic checks during mount (e.g. whether the client helper daemon
# and storage servers are reachable). Mounting will fail if a problem is
# detected.
# Values: Set the time (in ms) you want to spend waiting for the servers
# (especially the management daemon) to respond. Use 0 to disable all checks
# and allow mounting even if no servers are reachable.
# Default: 3000

# [sysSessionCheckOnClose]
# Checks for a valid session on the storage servers when a file is closed. If
# this option is set to true, a potential cache loss from a crash of a storage
# server can be detected. This will be reported to the user application as a
# close() error code.
# Note: There is also a session check included in all read/write/fsync messages,
#    which is independent of this setting.
# Note: If this option is set to true, more network messages are required on
#    close(), so performance will decreased.
# Default: false

# [sysSyncOnClose]
# Sync file contents on close. If this option is set to true, the storage
# servers will flush the write cache of a file to disk immediately when it is
# closed by the application. If this option is set to false, the write cache
# will be flushed to disk asynchronously after a few seconds.
# Note: If this option is true, performance will be decreased.
# Default: false

# [sysTargetOfflineTimeoutSecs]
# Timeout until all storage targets are considered offline when no target state
# updates can be fetched from the management server.
# If this value is 0, targets will never be set to offline due to an
# unreachable management node and will stay in state probably-offline.
# Note: This must be at least twice as large as the value of
# sysTargetOfflineTimoutSecs in the server config files.
# Values: time in seconds
# Default: 900

# [sysUpdateTargetStatesSecs]
# Interval in which the states of the storage targets are checked.
# Note: This must be significantly shorter than the sysTargetOfflineTimeoutSecs
# value set in the server (recommendation: maximum 1/3 of it).
# Values: time in seconds
# Default: 30

# [sysXAttrsEnabled]
# Enable extended attributes (also know as EAs/xattrs).
# Default: false

# [sysACLsEnabled]
# Allow the creation and enforcement of Access Control Lists (ACLs).
# Note: Only works if sysXAttrsEnabled=true.
# Note: Requires at least Linux kernel version 3.2.
# Note: Enabling this setting can affect metadata performance.
# Default: false

# [sysRenameEbusyAsXdev]
# Changes the semantics of rename() to return an EXDEV error if a file could not
# be moved because it is in use (instead of the default EBUSY). Applications and
# tools like mv can handle EXDEV and fall back to copy/unlink for the files.
# This is mostly useful for NFS exports, where files may not be closed by the
# server until after the last open file handle has been closed by clients. This
# can cause spurious EBUSY errors in clients that close a file and rename it
# immediately afterwards.
# Default: false

#
# --- Section 4.5: [Tuning] ---
#

# [tuneFileCacheType]
# Sets the file read/write cache type.
# Values: "none" (disable client caching), "buffered" (use a pool of small
#    static buffers for write-back and read-ahead), "native" (experimental, use
#    the kernel pagecache), "paged" (experimental, deprecated).
# Note: The cache protocols are currently non-coherent (but caches are
#    automatically flushed when a file is closed).
# Note: When client and servers are running on the same machine, "paged" mode
#    contains the typical potential for memory allocation deadlocks (also known
#    from local NFS server mounts). So do not use "paged" mode for clients that
#    run on a metadata or storage server machine.
# Default: buffered

# [tunePreferredMetaFile], [tunePreferredStorageFile]
# Path to a text file that contains the numeric IDs of preferred storage targets
# and metadata servers. These will be preferred when the client creates new file
# system entries. This is useful e.g. to take advantage of data locality in the
# case of multiple data centers. If unspecified, all available targets and
# servers will be used equally.
# Usage: One targetID per line for storage servers, one nodeID per line for
#    metadata servers.
# Note: TargetIDs and nodeIDs can be queried with the beegfs-ctl tool.
# Default: <none>

# [tuneRemoteFSync]
# Controls whether fsync() syscalls from a user application should only be
# executed on the client to transfer data from the client cache to server
# cache (=false); or also on the servers to flush the server's cached file
# data to the disks (=true).
# Default: true

# [tuneUseGlobalAppendLocks]
# Controls whether files opened in append mode should be protected by locks on
# the local machine only (=false) or globally on the servers (=true).
# Default: false

# [tuneUseGlobalFileLocks]
# Controls whether application advisory file locks via flock() and fcntl()
# should be checked for conflicts on the local machine only (=false) or
# globally on the servers (=true).
# Default: false

# [tuneCoherentBuffers]
# Enables or disables coherence between the buffers used by
# tuneFileCacheType=buffered and the page cache.
# If a file is concurrently accessed via mmap() regions and read()/write()
# system calls, the buffers used by tuneFileCacheType=buffered and the page
# cache used by mmap() may go out of sync - changes made in an mmap()ed region
# may not be visible to read() calls immediately, or changes made by write()
# calls may not be immediately reflected in mmap()ed regions.
# Many programs that use both methods of accessing a file assume that
# read()/write() and mmap() present the same view of the file, if this is not
# the case, those programs may not work correctly. Programs that have been
# observed to misbehave with non-coherent buffers are, for example, git and
# some in-memory database applications.
# When this option is enabled, files that are currently mmap()ed will behave as
# though they had been opened with tuneFileCacheType=none
# Default: true
